Skip to content

feat: non breaking strict mode for EnumFrom@wrap#4

Merged
trippo merged 2 commits intodatomatic:mainfrom
Carnicero90:main
Dec 19, 2025
Merged

feat: non breaking strict mode for EnumFrom@wrap#4
trippo merged 2 commits intodatomatic:mainfrom
Carnicero90:main

Conversation

@Carnicero90
Copy link
Contributor

When strict is true, Enum::wrap(self|string|int|null $value, bool $strict = false) now throws a ValueError if the value cannot be resolved to an enum instance. Default behavior is unchanged (returns null).

@trippo trippo merged commit 15013b8 into datomatic:main Dec 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants